Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eol to e2e and fix certifier logic #2396

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

robert-cronin
Copy link
Collaborator

@robert-cronin robert-cronin commented Dec 20, 2024

Description of the PR

Fixes #2395

In addition to adding the e2e test query, this PR will also address some issues with the EOL certifier logic. For example, the parsing of purls now uses standard helper methods and the check for whether a node has EOL data is now more specific to mitigate false positives.

PR Checklist

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If GraphQL schema is changed, GraphQL client updates/additions have been made
  • If OpenAPI spec is changed, make generate has been run
  • If ent schema is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

@robert-cronin robert-cronin force-pushed the feat/add-eol-to-e2e branch 2 times, most recently from 6a26e15 to 958be3f Compare January 9, 2025 04:47
@robert-cronin
Copy link
Collaborator Author

This PR should be merged after #2391

@robert-cronin robert-cronin marked this pull request as ready for review January 9, 2025 04:48
@robert-cronin
Copy link
Collaborator Author

e2e test working locally:

@@@@ Running query EndOfLifeQ1
image

@robert-cronin robert-cronin force-pushed the feat/add-eol-to-e2e branch 3 times, most recently from 0ed7faf to ef928a8 Compare January 13, 2025 04:16
@robert-cronin robert-cronin self-assigned this Jan 22, 2025
notGUACTypePackagePredicates(),
packageversion.Not(
packageversion.HasMetadataWith(
hasmetadata.KeyEQ("endoflife"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, does this work? Are we not missing the timestamp field here per

var pkgLatestScan []struct {
ID uuid.UUID `json:"id"`
LastScanTimeDB time.Time `json:"max"`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timestamp field is available on the hasMetadata to check the values similar to the others.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Initially, I was trying to prevent duplicate nodes by not querying timestamp because the timestamp was new every time. But it's now using the date of last support as the timestamp so there won't be any duplicates. I've just updated it to match the others.

@robert-cronin robert-cronin force-pushed the feat/add-eol-to-e2e branch 2 times, most recently from bf4eeeb to f826c12 Compare January 28, 2025 07:04
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Add EOL to e2e test
2 participants